package com.cruise.game.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cruise.game.model.entity.Announcement;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 通告Mapper接口
 * 
 * @author cruise
 * @date 2025-02-28
 */
@Repository
public interface AnnouncementMapper extends BaseMapper<Announcement> {

    /**
     * 查询活动通告列表
     *
     * @return 通告列表
     */
    List<Announcement> selectActiveList();

    /**
     * 更新通告状态
     *
     * @param id     通告ID
     * @param status 状态
     * @return 影响的行数
     */
    int updateStatus(@Param("id") Long id, @Param("status") String status);
}
